package com.anyisn.anyflickr.shell.controller
{
	import com.anyisn.anyflickr.common.ApplicationConstants;
	import com.anyisn.anyflickr.shell.model.*;
	import com.anyisn.anyflickr.shell.view.*;
	
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	public class StartupCommand extends SimpleCommand
	{
		override public function execute(notification:INotification):void {
			var app:AnyFlickr = notification.getBody() as AnyFlickr;
			
			facade.registerProxy(new AuthProxy());
			facade.registerProxy(new ListPhotosProxy());
			facade.registerProxy(new SlidePhotosProxy());
			facade.registerProxy(new PhotoProxy());
			facade.registerProxy(new PeopleProxy());
			facade.registerProxy(new AppXMLDataProxy());
			facade.registerProxy(new TestProxy());
			facade.registerProxy(new UpdateProxy());
			facade.registerProxy(new GoogleServiceProxy());
			
			facade.registerMediator(new ApplicationMediator(app));
			facade.registerMediator(new ApplicationJunctionMediator());
			
			// 在thumb和photoinfo中都要用到这个右键菜单，所以统一对其引用的原数据进行处理
			var photoMenu:Array = ApplicationConstants.photoMenu;
			photoMenu[0].enabled = false;
		}
	}
}